package com.evl.refundOrder.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.evl.common.controller.BaseController;
import com.evl.common.persistence.model.RefundOrder;
import com.evl.refundOrder.service.IRefundOrderService;

/**
 * 退单管理控制器
 *
 * @author 
 * @Date 2017-07-20 15:07:39
 */
@Controller
@RequestMapping("/refundOrder")
public class RefundOrderController extends BaseController {

    private String PREFIX = "/refundOrder/";
    
    @Resource
    private IRefundOrderService iRefundOrderService;

    /**
     * 跳转到退单管理首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "refundOrder.html";
    }

    /**
     * 跳转到添加退单管理
     */
    @RequestMapping("/refundOrder_add")
    public String refundOrderAdd() {
        return PREFIX + "refundOrder_add.html";
    }

    /**
     * 跳转到修改退单管理
     */
    @RequestMapping("/refundOrder_update/{refundOrderId}")
    public String refundOrderUpdate(@PathVariable Integer refundOrderId, Model model) {
        return PREFIX + "refundOrder_edit.html";
    }

    /**
     * 获取退单管理列表
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list(RefundOrder refundOrder) {
        return iRefundOrderService.searchRefundOrderList(refundOrder);
    }

    /**
     * 新增退单管理
     */
    @RequestMapping(value = "/add")
    @ResponseBody
    public Object add() {
        return super.SUCCESS_TIP;
    }

    /**
     * 删除退单管理
     */
    @RequestMapping(value = "/delete")
    @ResponseBody
    public Object delete() {
        return SUCCESS_TIP;
    }


    /**
     * 修改退单管理
     */
    @RequestMapping(value = "/update")
    @ResponseBody
    public Object update() {
        return super.SUCCESS_TIP;
    }

    /**
     * 退单管理详情
     */
    @RequestMapping(value = "/detail")
    @ResponseBody
    public Object detail() {
        return null;
    }
}
